package com.fzf.org.dao.entities;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fzf.org.base.BaseDO;
import lombok.*;
import lombok.experimental.SuperBuilder;

import java.util.Date;


@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("t_draft")
public class DraftDO{

    @TableId(type = IdType.AUTO)
    private Long id; // 草稿的唯一id，主键，自增

    private Long userId; // 草稿的创作者的id

    private String title; // 草稿的题目，可空

    private String content; // 草稿的内容，可空

    private Long blogId;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
}
